home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Sounds Terrific 1
/
Sounds Terrific CD (1994)(Weird Science)(Disc 2 of 2)[!][Amiga-PC].iso
/
modules
/
h
/
had.mod
< prev
next >
Wrap
Text File
|
1994-08-04
|
3KB
|
129 lines
Hang up after download mod...
Jim Wire #1 @3950
Sun Dec 08 09:50:56 1991
File : HAD.MOD
Mod : HAD.MAD
Version : 1.0
Written for : WWIV 4.20e
Author : Jim Wire 1@3950
1@13950
Affects : File BATCH.C:
Indications : 1. This mod allows users to change their minds after having
selected hang up after batch transfer.
Requires : 1. WWIV 4.20b
Cautions : 1. If you need to be reminded to back up your source, then
consider yourself reminded. As a matter of fact this
would be a good time to back up your whole BBS.
2. If you have trouble getting this mod to work for you
don't wait to drop me E-Mail. I call Dragon's Den
and Amber regularly. I'm the only Jim Wire on either
of those two BBS's. You can NET E-Mail me at 3950.
You can crash mail me too, I am the only Jim Wire in
the Fidonet nodelist.
NOTE: This mod goes into batch.c entirely.
The Mod : 1. In BATCH.C, function void ymbatchdl(int had) search for:
if (had) {
dtr(0);
hangup=1;
}
change it to:
if (had) {
bihangup(0); /* had.mod +*/
}
The Mod : 2. In BATCH.C, function void run_cmd(char *cmdln, char
*downlist, char *uplist, char *dl, int had) search for:
if (had) {
dtr(0);
hangup=1;
wait1(2);
if (!cdet()) {
dtr(1);
wait1(2);
holdphone(1);
}
} else {
nl();
pl("Please wait...");
nl();
}
change it to:
if (had) {
bihangup(1); /* had.mod +*/
} else {
nl();
pl("Please wait...");
nl();
}
The Mod : 3. In BATCH.C, add the function void bihangup(int up) to the
end of the file.
/* beginning of had.mod additions */
void bihangup(int up)
/* This function returns one character from either the local keyboard or
* remote com port (if applicable). After 5 seconds of inactivity, a
* beep is sounded. After 10 seconds of inactivity, the user is hung up.
*/
{
unsigned char ch;
int beepyet;
long dd;
beepyet = 0;
timelastchar1=timer1();
nl();
outstr("Automatic disconnect in progress.");
nl();
outstr("Press any key to return to system.");
nl();
outchr(7);
outchr(7);
do {
while (empty() && !hangup) {
dd = timer1();
if (labs(dd - timelastchar1) > 65536L)
timelastchar1 -= 1572480L;
if (((dd - timelastchar1) > 91L) && (!beepyet)) {
outstr("Hanging up now.");
beepyet = 1;
outchr(7);
}
if (labs(dd - timelastchar1) > 182) {
nl();
outstr("Thank you for calling.");
nl();
dtr(0);
hangup = 1;
if(up) {
wait1(2);
if (!cdet()) {
dtr(1);
wait1(2);
holdphone(1);
}
}
}
checkhangup();
}
ch = inkey();
} while (!ch && !hangup);
}
/* end of had.mod additions */
The Mod : 4. Make fcns and make.
/* end of file */